package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 罚金记录创建DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "罚金记录创建DTO", description = "创建罚金记录时的数据传输对象")
public class FineRecordCreateDTO {

    @NotBlank(message = "用户ID不能为空")
    @Schema(description = "用户ID", example = "1", required = true)
    private String userId;

    @NotBlank(message = "借阅记录ID不能为空")
    @Schema(description = "借阅记录ID", example = "1", required = true)
    private String borrowRecordId;

    @NotNull(message = "罚金类型不能为空")
    @Schema(description = "罚金类型 (1-逾期罚金, 2-损坏赔偿, 3-丢失赔偿)", example = "1", required = true)
    private Integer fineType;

    @NotNull(message = "罚金金额不能为空")
    @Positive(message = "罚金金额必须大于0")
    @Schema(description = "罚金金额", example = "10.00", required = true)
    private BigDecimal fineAmount;

    @Size(max = 500, message = "罚金说明长度不能超过500个字符")
    @Schema(description = "罚金说明", example = "图书逾期3天")
    private String description;

    @Schema(description = "操作员ID", example = "admin")
    private String operatorId;
}
